<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>Document</title>
        <script src="../vue.js"></script>
    </head>
    <body>
        <div id="app">
            <com></com>
        </div>
        <template id="a">
            <div>
                <button>按钮{{child}}</button>
            </div>
        </template>
        <script>
            let btn = {
                template: '#a',
                // props: ['child'],
                props: {
                    child: {
                        // type: Number,
                        // type: [Number, String],
                        // default: 200,

                        // type: Object,
                        // default: function () {
                        //     return {};
                        // },
                        // default: () => {},

                        type: Array,
                        default: function(){
                            return [];
                        }
                    },
                    // child: Number,
                },
                data() {
                    return {
                        // child: '',
                    };
                },
            };
            let vm = new Vue({
                el: '#app',
                data() {
                    return {
                        // a: 100, // '100'
                        a: { id: 1001 },
                    };
                },
                methods: {},
                components: {
                    com: btn,
                },
            });

        </script>
    </body>
</html>
